<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>axicdma: xaxicdma_example_simple_intr.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">axicdma
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xaxicdma__example__simple__intr_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xaxicdma_example_simple_intr.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file demonstrates how to use the xaxicdma driver on the Xilinx AXI CDMA core (AXICDMA) to transfer packets in simple transfer mode through interrupt. </p>
<p>Modify the NUMBER_OF_TRANSFER constant to have different number of simple transfers done in this test.</p>
<p>This example assumes that the system has an interrupt controller.</p>
<p>To see the debug print, you need a Uart16550 or uartlite in your system, and please set "-DDEBUG" in your compiler options for the example, also comment out the "#undef DEBUG" in xdebug.h. You need to rebuild your software executable.</p>
<pre>
MODIFICATION HISTORY:</pre><pre> . Updated the debug print on type casting to avoid warnings on u32. Cast
   u32 to (unsigned int) to use the x format.</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.00a jz   07/30/10 First release
2.01a rkv  01/28/11 Changed function prototype of XAxiCdma_SimpleIntrExample
                       to a function taking arguments interrupt instance,device
                       instance,device id,device interrupt id
               Added interrupt support for Cortex A9
2.01a srt  03/05/12 Modified interrupt support for Zynq.
                       Modified Flushing and Invalidation of Caches to fix CRs
               648103, 648701.
4.3   ms   01/22/17 Modified xil_printf statement in main function to
           ensure that "Successfully ran" and "Failed" strings are
           available in all examples. This is a fix for CR-965028.
      ms   04/05/17 Modified Comment lines in functions to
                    recognize it as documentation block for doxygen
                    generation of examples.
4.4   rsp  02/22/18 Support data buffers above 4GB.Use UINTPTR for
                    typecasting buffer address(CR-995116).
4.6   rsp  09/13/19 Add error prints for failing scenarios.
                    Fix cache maintenance ops for source and dest buffer.
4.7   rsp  12/06/19 For aarch64 include xil_mmu.h. Fixes gcc warning.
4.8      sk   09/28/20 Fix the compilation error for xreg_cortexa9.h
                       preprocessor on R5 processor.
4.11  sa   09/29/22 Fix infinite loops in the example.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a752066bea2fa0543955d809c5907c34e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxicdma__example__simple__intr_8c.html#a752066bea2fa0543955d809c5907c34e">XAxiCdma_SimpleIntrExample</a> (XScuGic *IntcInstancePtr, XAxiCdma *InstancePtr, u16 DeviceId, u32 IntrId)</td></tr>
<tr class="memdesc:a752066bea2fa0543955d809c5907c34e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The example to do the simple transfer through interrupt.  <a href="#a752066bea2fa0543955d809c5907c34e">More...</a><br/></td></tr>
<tr class="separator:a752066bea2fa0543955d809c5907c34e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxicdma__example__simple__intr_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The entry point for this example.  <a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br/></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The entry point for this example. </p>
<p>It invokes the example function, and reports the execution status.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if example finishes successfully</li>
<li>XST_FAILURE if example fails.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None </dd></dl>

<p>References <a class="el" href="xaxicdma__example__simple__intr_8c.html#a752066bea2fa0543955d809c5907c34e">XAxiCdma_SimpleIntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a752066bea2fa0543955d809c5907c34e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XAxiCdma_SimpleIntrExample </td>
          <td>(</td>
          <td class="paramtype">XScuGic *&#160;</td>
          <td class="paramname"><em>IntcInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XAxiCdma *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>IntrId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The example to do the simple transfer through interrupt. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">IntcInstancePtr</td><td>is a pointer to the INTC instance </td></tr>
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the XAxiCdma instance </td></tr>
    <tr><td class="paramname">DeviceId</td><td>is the Device Id of the XAxiCdma instance </td></tr>
    <tr><td class="paramname">IntrId</td><td>is the interrupt Id for the XAxiCdma instance in build</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if example finishes successfully</li>
<li>XST_FAILURE if error occurs</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the hardware build has problems with interrupt, then this function hangs </dd></dl>

<p>References <a class="el" href="group__axicdma.html#gab746b095007351c2fb2c1a7cf3693f2c">XAxiCdma_CfgInitialize()</a>, <a class="el" href="group__axicdma.html#ga9f146fe224ea4c9a86477de3030dd79a">XAxiCdma_IntrEnable()</a>, <a class="el" href="group__axicdma.html#ga8acd5bf5f5f072c6e425a8cc1b589498">XAxiCdma_IntrHandler()</a>, <a class="el" href="group__axicdma.html#ga3ecc6331ed89e613e7f1fb53f45a4cb0">XAxiCdma_LookupConfig()</a>, and <a class="el" href="group__axicdma.html#gad2b921e876e581f84be0e7c152d13221">XAXICDMA_XR_IRQ_ALL_MASK</a>.</p>

<p>Referenced by <a class="el" href="xaxicdma__example__simple__intr_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
